#ifndef GAMEENGINE_GRAPHICS_SHADER_DEFS_H
#define GAMEENGINE_GRAPHICS_SHADER_DEFS_H

#include <GameEngine/Graphics/openGL.h>

//! Force glew to be included as a static library
#define GLEW_STATIC

#include <GL/glew.h>
#include <iostream>
#include <fstream>

// //! @brief Make shaders verbose when an error occurs
// //! @details Please note that the error output in the std stream will significantly slow down the performance
#ifdef _DEBUG
// #define VERBOSE_SHADERS
#endif

//! Check whether a shader entry is valid (i.e., superior to 0) and display an error message if it is not
/*!
 @note For the sake of efficiency, this only works in debug mode. This function can indeed display a large
       number of messages, which strongly impacts performance.
 */
#ifdef VERBOSE_SHADERS
	#define CHECK_SHADER_ID(ID) { \
		if ( ID < 0 ) \
			std::cerr << "Error at line " << __LINE__ << " in file " << __FILE__ << " - \"" << ID << "\" is not a valid shader ID." << std::endl; \
		}
#else
	#define CHECK_SHADER_ID(ID) {}
#endif

#endif
